﻿using System.Collections.Generic;
using PgBirdie.Core.Model.Database.Structure;
using PgBirdie.Core.Model.Database.Structure.Constraint;
using PgBirdie.Core.Model.Database.Structure.Index;

namespace PgBirdie.Core.Service.Delta
{
    public interface IDeltaStructureDbObjectToSqlService
    {
        string AddConstraints(IDictionary<string, PgConstraintBase> constraints);
        string DropConstraints(IDictionary<string, PgConstraintBase> constraints);

        string DropIndexes(IDictionary<string, PgIndex> indexes);
        string DropTables(IDictionary<string, PgTable> tables);
        string DropSchemas(IDictionary<string, PgSchema> schemas);
        string CreateIndexes(IDictionary<string, PgIndex> indexes);
        string CreateSchemas(IDictionary<string, PgSchema> schemas);
        string CreateSequences(IDictionary<string, PgSequence> sequences);
        string CreateTables(IDictionary<string, PgTable> tables);
        string AlterTables(IDictionary<string, PgTable> tables, PgDatabase targetDb);
        
        string DropColumns(IDictionary<string, PgColumn> columns);
        string AddColumns(IDictionary<string, PgColumn> columns);
        string AlterColumns(IDictionary<string, PgColumn> sourceColumns, IDictionary<string, PgColumn> targetColumns);               
    }
}